#include "mystdio.h"
#include <stdio.h>
#include <string.h>

int main() {
  // 打开文件
  myFILE* fp = my_fopen("./log.txt", "w");
  if (!fp) {
    printf("my_fopen fail\n");
    return -1;
  }

  // 向文件中写入数据
  const char* msg = "oh yeah! this is my stdio\n";
  my_fwrite(msg, strlen(msg), fp);

  // 关闭文件
  my_fclose(fp);

  return 0;
}
